<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js练习</title>
		<script>
			// alert(666);
		</script>
	</head>
	<body>
		<a href="#" onclick="console.log(100)">onclick单击</a>
		<a href="#" ondblclick="console.log(200)">双击</a>
		<a href="#" onmouseenter="console.log(300)">鼠标滑过</a>
		<a href="#" onmousedown="console.log(400)">鼠标</a>
		<a href="#" onmouseup="console.log(500)">鼠标抬起?</a>
		<a href="#" onmousewheel="console.log(600)">鼠标滚轮?</a>
		<button type="button" onclick="f4()">点我</button>
		<p id="demo1"></p>
		<p id="demo2"></p>
		<p id="app" ></p>
		<script>
			console.log(typeof 1)
			console.log(typeof '1')
			console.log(1=='1')
			console.log(1==='1')
			var a=[1,2,3,'aa',true,null]
			for(var i=0;i<a.length;i++){
				console.log(a[i])
			}
			for(var i in a){
				console.log(a[i])
			}
			function f1(){
				console.log("函数f1")
			}
			f1();
			var f2=function(){
				console.log("函数f2")
			}
			f2()
			var f3=function(a,b){
				console.log(a+b)
			}
			function f4(){
				document.getElementById("demo1").innerHTML="hello world!"
				document.getElementById("demo2").innerHTML="how are you?"
			}
			function toCelsius(F){
				return (5/9)*(F-32);
			}
			document.getElementById("app").innerHTML=toCelsius(86)
		</script>
	</body>
</html>
